<script setup lang="ts">
import { IParam } from "@interface";
import {
  UserOutlined,
} from '@ant-design/icons-vue';
interface MenuItemProps{
  items: IParam[];
}
const props = withDefaults(defineProps<MenuItemProps>(), {});
</script>

<template>
  <template v-for="item in items" :key="item.id">
    <template v-if="!item.items">
      <a-menu-item v-if="!item.hidden" :key="item.id">
        <template #icon>
          <UserOutlined />
        </template>
        {{ item.title }}
      </a-menu-item>
    </template>
    <template v-else>
      <a-sub-menu v-if="!item.hidden" :key="item.id">
        <template #icon>
          <UserOutlined />
        </template>
        <template #title>{{ item.title }}</template>
        <app-menu-item :items="item.items" />
      </a-sub-menu>
    </template>
  </template>
</template>

<style scoped>

</style>